package me.jiatao.usercenter.data.api

import io.reactivex.Observable
import me.jiatao.baselibrary.data.protocol.HttpResult
import me.jiatao.usercenter.data.protocol.LoginReq
import me.jiatao.usercenter.data.protocol.RegisterReq
import me.jiatao.usercenter.data.protocol.UserInfo
import retrofit2.http.Body
import retrofit2.http.POST

interface UserApi {
    /**
     *  用户注册
     */
    @POST("userCenter/register")
    fun register(@Body req: RegisterReq): Observable<HttpResult<String>>

    /*
       用户登录
    */
    @POST("userCenter/login")
    fun login(@Body req: LoginReq): Observable<HttpResult<UserInfo>>
}